package com.lc.zpyh.sqlite;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public  class BrowseSQLiteOpenHelper extends SQLiteOpenHelper {
    private final static String DB_NAME = "SqliteBrowse.db";
    private final static int DB_VERSION = 1;

    public BrowseSQLiteOpenHelper(Context context) {
        super(context, DB_NAME, null, DB_VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        String sql=
                "create table browseentity("+
                        "id INTEGER  PRIMARY KEY AUTOINCREMENT,"+
                        "commodityname VARCHAR(255),"+
                        "shopname VARCHAR(255),"+
                        "shopimg VARCHAR(255),"+
                        "shopid VARCHAR(255),"+
                        "commodityid VARCHAR(255),"+
                        "date VARCHAR(255)"+
                        ")";//如果

        String sqlStr = "CREATE TABLE IF NOT EXISTS records (_id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT);";
        db.execSQL(sql);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
